package wang.Second;
import java.util.ArrayList;

public class jihe {
    public static void main(String[] args) {
        ArrayList<String> list =new ArrayList<>();

        list.add("a");
        list.add("c");
        list.add("b");

        System.out.print("[");
        for (int i = 0; i < list.size(); i++) {
            if(i==list.size()-1){
                System.out.print(list.get(i));
            }
            else {
                System.out.print(list.get(i)+",");
            }
        }
        System.out.println("]");
    }
}
